package com.wxzz.elearing.user.api.server;

import com.wxzz.elearing.user.service.IEnterpriseOrganizationService;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/enterprise-organization-api")
public class EnterpriseOrganizationApi {

    @Autowired
    private IEnterpriseOrganizationService enterpriseOrganizationService;

    /**
     * 根据id查询组织架构
     *
     * @param organizationId
     * @return
     */
    @RequestMapping(value = "selectOrganizationById", method = RequestMethod.POST)
    public ReturnVO<String> selectOrganizationById(@RequestParam("organizationId") Long organizationId) {
        return enterpriseOrganizationService.selectOrganizationById(organizationId);
    }
}
